package high;
class MyThread extends Thread{
    public static int num=0;
    public static final int maxnum=100;
    public MyThread(String name){
        super(name);
    }
    @Override
    public void run() {
        while(num<=maxnum){
            System.out.println(Thread.currentThread().getName()+":"+num++);
        }
    }
}
/**
 * @author 47868
 */
public class ThreadTest1 {
    public static void main(String[] args) {
        MyThread thread1=new MyThread("一号机");
        thread1.start();
        MyThread thread2=new MyThread("二号机");
        thread2.start();
        MyThread thread3=new MyThread("三号机");
        thread3.start();
    }
}
